package org.xx.armory.spring5.jdbc;

import org.xx.armory.spring5.domain.Book;

import java.sql.ResultSet;

public class BookMapper
        extends EntityMapper<Long, Book> {
    @Override
    protected Book extractEntity(
            ResultSet resultSet
    ) {
        return new Book(
                getLongValue(resultSet, 1),
                getString(resultSet, 2),
                getString(resultSet, 3),
                getDate(resultSet, 4),
                getBigDecimal(resultSet, 5),
                getIntegerValue(resultSet, 6)
        );
    }
}
